changeTransaction = function(lien) {
  hideSubmenu();
  if (lien == null)
    lien = "gestion-transactions.htm";
  var vParentId = $("input[name=parentId]").val();
  $.post(lien, {}, function(xml) {
    $("#corps").html(xml);
    parseTransaction();
  });
}

checkAllLinesTransactions = function() {
  if (!$("#list-of-transactions thead input:checkbox").is(':checked')) { // On décode tout.
    $("#list-of-transactions tbody input:checkbox").removeAttr('checked');
    $("#list-of-transactions tbody tr").removeClass('current');
  } else {
    $("#list-of-transactions tbody input:checkbox").attr('checked', 'checked');
    $("#list-of-transactions tbody tr + tr").addClass('current');
  }
}

parseTransaction = function() {
  $("#list-of-transactions thead input:checkbox").click(function(){ checkAllLines("list-of-transactions"); });
  $("#list-of-transactions tbody input:checkbox").click(function(){ checkLine($(this)); });
}
